package com.yuxi.controller.manager;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import com.yuxi.pubInter.exception.SkException;
import com.yuxi.pubInter.IBaseService;
import com.yuxi.pubInter.RestfulController;
import com.yuxi.dto.BannerDTO;
import com.yuxi.dto.BannerPageDTO;
import com.yuxi.modelExt.BannerExt;
import com.yuxi.searchExt.BannerSearchExt;
import com.yuxi.service.IBannerService;
import com.yuxi.vo.BannerDetailVO;
import com.yuxi.vo.BannerListVO;
import com.yuxi.vo.BannerDomainVO;
import com.yuxi.vo.BannerDetailDomainVO;

import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import com.yuxi.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-10-13 10:28:17
*    @description BannerController      广告图
*/
@Api(tags = "后台管理系统-广告图相关", description = "广告图相关接口")
@RestController(value ="bannerRestfulController")
@RequestMapping("/manager/banner/")
@Validated
public class BannerController extends ApiManageController<BannerDTO,BannerPageDTO,BannerExt, BannerSearchExt,BannerDomainVO,BannerDetailDomainVO,BannerDetailVO,BannerListVO,String> {

	@Resource(name = "bannerService")
	private IBannerService bannerService;



	@Override
	public IBaseService<BannerExt, BannerSearchExt,String> getBaseService() throws SkException {
		return bannerService;
	}

	@Override
	public String getBaseRoute() {
		return "/manager/banner/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "广告图";
	}



	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(banner.b_id) as countNum");
		return totalMapSet;
	}


}